package com.tools.cleanmaster.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.tools.cleanmaster.CleanApplication;
import com.tools.cleanmaster.CleanConstant;
import com.tools.cleanmaster.bean.AutoCleanFeature;

/**
 * Created by wuyanfei on 16/4/28.
 */
public class AutoCleanReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (CleanConstant.ACTION_AUTO_CLEAN_TASK.equals(action)) {
            if (AutoCleanFeature.AUTO_CACHE.isEnable()) {
                CleanApplication.getInstance().getAutoCleanManager().doScan();
            }
        }
    }
}
